package com.vunguyen.service;

import java.util.List;

import javax.transaction.Transactional;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.vunguyen.dao.LichLamViecDAO;
import com.vunguyen.model.Lichlamviec;

@Service
public class LichLamViecServiceImpl implements LichLamViecService {

	
	@Autowired
	private LichLamViecDAO lichlamviecDAO;
	
	@Override
	@Transactional
	public List<Lichlamviec> getLichLamViec() {
		return this.lichlamviecDAO.getLichLamViec();
	}

	@Override
	@Transactional
	public void addLichLamViec(Lichlamviec lichlamviec) {
		lichlamviecDAO.addLichLamViec(lichlamviec);
		
	}

	@Override
	@Transactional
	public List<Lichlamviec> getListLichlamviecById(int idlichlamviec) {
		return lichlamviecDAO.getListLichlamviecById(idlichlamviec);
	}

	@Override
	@Transactional
	public void updateLichLamViec(Lichlamviec lichlamviec, int idlichlamviec) {
		lichlamviecDAO.updateLichLamViec(lichlamviec, idlichlamviec);
		
	}

	@Override
	@Transactional
	public void xoaLichLamViec(int idlichlamviec) {
		lichlamviecDAO.xoaLichLamViec(idlichlamviec);
		
	}

}
